# include <iostream>
#include <algorithm>
#include <vector>
using namespace std;
class TransForm{
public:
    int operator()(int val){
        return val+10000;
    }
};
class myPrint{
public:
    void operator()(int val){
        cout<<val<<" ";
    }
};
void test01(){
    vector<int>v;
    for (int i = 0; i < 10; ++i) {
        v.push_back(i);
    }
    vector<int>vTarget;
    vTarget.resize(v.size());
    transform(v.begin(),v.end(),vTarget.begin(),TransForm());
    for_each(vTarget.begin(),vTarget.end(),myPrint());
}
int main() {
test01();
    system("pause");
    return 0;
}
